package com.lzh.others.java7.trywithresources;

/**
 * @Description:
 * @Author: LiuZiHao
 * @Date: 2022/7/26 11:13
 */
public class CloseableObjectA implements AutoCloseable {


    public CloseableObjectA() {
        System.out.println("CloseableObjectA.CloseableObjectA");
    }

    @Override
    public void close() throws Exception {
        System.out.println("CloseableObjectA.close");
        throw new RuntimeException("CloseableObjectA.close throw exception");
    }

    public void testException() {
        throw new RuntimeException("throwException test");
    }
}
